<?php

// mbilling/BillingBundle/Entity/bonuses.php
namespace mbilling\BillingBundle\Entity;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 */
class bonuses
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(type="string", length=100)
     * @assert\NotBlank
     */
    protected $name;
    
    /**
     * @ORM\Column(type="float")
     * @assert\Type("numeric")
     * @assert\NotBlank
     */
    protected $sum;
    
    /**
     * @ORM\Column(type="float")
     * @assert\Type("numeric")
     * @assert\NotBlank
     */
    protected $adding;

    /**
     * @ORM\Column(type="string", length=100)
     */
    protected $coupon;
    
    /**
     * @ORM\Column(type="integer")
     */
    protected $coupon_num;
    
    /**
     * @ORM\Column(type="boolean")
     */
    protected $is_percent;
    
    /**
     * @ORM\Column(type="boolean")
     */
    protected $is_active;
    
    public function setId($id)
    {
        $this->id = $id;
    }
    public function getId()
    {
        return $this->id;
    }

    public function setName($name)
    {
        $this->name = $name;
    }
    public function getName()
    {
        return $this->name;
    }
    
    public function setSum($sum)
    {
        $this->sum = $sum;
    }
    public function getSum()
    {
        return $this->sum;
    }

    public function setAdding($adding)
    {
        $this->adding = $adding;
    }
    public function getAdding()
    {
        return $this->adding;
    }

    public function setCoupon($coupon)
    {
        $this->coupon = $coupon;
    }
    public function getCoupon()
    {
        return $this->coupon;
    }
    
    public function setCouponNum($coupon_num)
    {
        $this->coupon_num = $coupon_num;
    }
    public function getCouponNum()
    {
        return $this->coupon_num;
    }
    
    public function setIsPercent($is_percent)
    {
        $this->is_percent = $is_percent;
    }
    public function getIsPercent()
    {
        return $this->is_percent;
    }
    
    public function setIsActive($is_active)
    {
        $this->is_active = $is_active;
    }
    public function getIsActive()
    {
        return $this->is_active;
    }
    
    public function initDefaultEntity()
    {
        $this->setName('superBonus');
        $this->setSum('333.3');
        $this->setAdding('15');
        $this->setCoupon('');
        $this->setIsPercent('1');
        $this->setIsActive('1');
        return $this;
    }
}
?>
